<template>
	<view class="content">
		<view class="status_bar">
		</view>
		<view class="head">
			下單成功
		</view>
		<view class="center">
			<image class="c-img" src="../../../static/images/success.png" mode=""></image>
			<view class="c-j">
				訂單金額
			</view>
			<view class="c-price">
				MOP {{totalPrice}}
			</view>
			<view class="btn-o" @click="lookorder">
				查看訂單
			</view>

			<view class="btn-t" @click="back">
				返回首頁
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				totalPrice: '',
				order_id: '',
			}
		},
		onLoad(e) {
			this.totalPrice = e.totalPrice
			this.order_id = e.order_id
			console.log(this.totalPrice);
		},
		methods: {
			lookorder() {
				uni.navigateTo({
					url: `/pages/mine/order/details?orderid=${this.order_id}`
				})
			},
			back() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss">
	.content {
		.status_bar {
			height: var(--status-bar-height);
			width: 100vw;
		}

		.head {
			margin: 20rpx;
			text-align: center;
			font-size: 34rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #333333;
		}

		.center {
			margin-top: 100rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;

			.c-img {
				width: 100rpx;
				height: 100rpx;
			}

			.c-j {
				margin: 32rpx;
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
			}

			.c-price {
				font-size: 48rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #333333;
			}

			.btn-o {
				margin-top: 200rpx;
				text-align: center;
				line-height: 80rpx;
				width: 600rpx;
				height: 80rpx;
				background: #645AED;
				opacity: 1;
				border-radius: 30rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #FFFFFF;
			}

			.btn-t {
				margin-top: 40rpx;
				text-align: center;
				line-height: 80rpx;
				width: 600rpx;
				height: 80rpx;
				border: 1px solid #CBCBCB;
				opacity: 1;
				border-radius: 30rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #333333;
			}
		}


	}
</style>